/**
 * 公共
 */
import {
  http
} from '@/api/service.js'
//项目相关组织机构

//身份证上传
export const cardImageToOrcAndSaveFile = http.config.baseURL + '/global/base/cardImageToOrcAndSaveFile'

//文件上传
export const uploadUrl = http.config.baseURL + '/global/base/app/singleFileUpload'



//账号密码登陆
export const accountPwdLogin = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/login/accountPwdLogin',
    data: data,
    params: params,
  })
}

// 找回密码
export const forgotPassword = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/register/forgotPassword',
    data: data,
    params: params,
  })
}

//发送短信验证码
export const sendVerifyMobileSms = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/base/sendVerifyMobileSms',
    data: data,
    params: params,
  })
}

// 验证码登陆
export const smsCodeLogin = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/login/smsCodeLogin',
    data: data,
    params: params,
  })
}

// 获取滑块验证码
export const getSlideVerifyImage = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/base/getSlideVerifyImage',
    data: data,
    params: params,
  })
}



// 撤回企业审核
export const cancelCompanyCheck = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/home/myInfo/cancelCompanyCheck',
    data: data,
    params: params,
  })
}



// 验证滑块位置
export const validSlideVerifyImage = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/base/validSlideVerifyImage',
    data: data,
    params: params,
  })
}


//获取省市区
export const getNationAreaByParentId = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/base/getNationAreaByParentId',
    data: data,
    params: params,
  })
}

//根据父ID查询字典
export const getDictByParentId = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/base/getDictByParentId',
    data: data,
    params: params,
  })
}

// 注册获取所有公司
export const registerGetCompanyList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/register/registerGetCompanyList',
    data: data,
    params: params,
  })
}


// 根据产业标记获取公司信息
export const getCompanySelectByCompanyServiceTypeId = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/base/getCompanySelectByCompanyServiceTypeId',
    data: data,
    params: params,
  })
}

// 手机号和公司一起注册
export const userAndCompanyRegister = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/register/userAndCompanyRegister',
    data: data,
    params: params,
  })
}


//获取企业信息
export const myCompanyInfo = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/home/myInfo/myCompanyInfo',
    data: data,
    params: params,
  })
}

//修改企业信息
export const updateCompanyInfo = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/home/myInfo/updateCompanyInfo',
    data: data,
    params: params,
  })
}


// 用户登陆后注册新公司
export const userLoginAfterCreateCompany = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/home/myInfo/userLoginAfterCreateCompany',
    data: data,
    params: params,
  })
}


// 发布经营信息
export const addBusiInfoData = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/sys/busiInfo/addData',
    data: data,
    params: params,
  })
}

// 我的经营信息查询
// export const getBusiInfoData = (data, params) => {
//     return http.middleware({
//         method: 'POST', // 必须大写
//         url: '/user/pc/sys/busiInfo/getPage',
//         data: data,
//         params: params,
//     })
// }

//获取经营信息分页
export const getBusiInfoPage = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/sys/busiInfo/getPage',
    data: data,
    params: params,
  })
}

//经营信息详情
export const getbusiInfoData = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/sys/busiInfo/getData',
    data: data,
    params: params,
  })
}

//编辑经营信息
export const updateBusiInfoData = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/sys/busiInfo/updateData',
    data: data,
    params: params,
  })
}


//撤销经营信息
export const cancelData = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/sys/busiInfo/cancelData',
    data: data,
    params: params,
  })
}




// 经营信息跟踪-列表查询
export const busInfoTrackPageList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/busInfoTrack/pageList',
    data: data,
    params: params,
  })
}

// 经营信息跟踪-详情
export const getBusInfoTrackDetail = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/busInfoTrack/getDetail',
    data: data,
    params: params,
  })
}




// 查看源信息
export const getbusiInfoRootData = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/platform/sys/busiInfo/getRootData',
    data: data,
    params: params,
  })
}

//经营信息跟踪-反馈填写(app端)
export const fillFeedback = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/busInfoTrack/fillFeedback',
    data: data,
    params: params,
  })
}




//经营信息跟踪-反馈情况
export const getFeedbackSituation = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/app/appBusInfoTrack/getFeedbackSituation',
    data: data,
    params: params,
  })
}


// 查看变更历史记录
export const getChangePage = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/sys/busiInfo/getChangePage',
    data: data,
    params: params,
  })
}


// 查看经营历史信息
export const getHistoryData = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/sys/busiInfo/getHistoryData',
    data: data,
    params: params,
  })
}

// 经营信息接收-查询接收情况(app端)
export const getReceiveSituation = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/app/appBusInfoTrack/getReceiveSituation',
    data: data,
    params: params,
  })
}

// 百度地图查询地址
export const getbusiInfoPlace = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/map/getPlace',
    data: data,
    params: params,
  })
}

// 根据地址查询经纬度
export const getPlaceByAddress = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/map/getPlaceByAddress',
    data: data,
    params: params,
  })
}

// 根据经纬度查询地址
export const getPlaceByLocation = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/global/map/getPlaceByLocation',
    data: data,
    params: params,
  })
}




// 查询用户个人信息
export const getByUserId = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/home/myInfo/getMyInfo',
    data: data,
    params: params,
  })
}

// 登陆后获取状态
export const getLoginAfterStatus = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/home/myInfo/getLoginAfterStatus',
    data: data,
    params: params,
  })
}

//获取待办数量
export const getMyTodo = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/todo/getMyTodo',
    data: data,
    params: params,
  })
}


//加入公司
export const joinCompany = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc//home/myInfo/joinCompany',
    data: data,
    params: params,
  })
}


export const busiInfoMapGetByPage = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/busiInfoMap/getBusiInfoPage',
    data: data,
    params: params,
  })
}


// 经营信息预警-列表查询
export const busiInfoForewarningList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/busiInfoForewarning/pageList',
    data: data,
    params: params,
  })
}

//经营信息发布统计
export const pubulishStatistics = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/busiInfoStatistics/pubulishStatistics',
    data: data,
    params: params,
  })
}

// 经营信息跟踪统计
export const trackStatistics = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/user/pc/busiInfoStatistics/trackStatistics',
    data: data,
    params: params,
  })
}